<?php
namespace  Admin\Model;

use Think\Model;

class AdminModel extends  Model{
    protected $_validate=array(
      array('user_name','require','用户名必须'),
        array('pwd','require','密码必须'),
        array('confirm','pwd','确认密码不正确',0,'confirm'),
        array('verify','require','验证码必须'),
        array('user_name','','账号名称已存在',0,'unique',1),
    );

    public function checklogin($username)
    {
         if(!$this->where("username=".$username)->find()) return false;
         return true;
    }
}
/**
 * Created by PhpStorm.
 * Admin: mahmutjan
 * Date: 2017/4/5
 * Time: 15:21
 */